Optimal. Leaf size=246 \[ \frac{\sqrt{d+e x} \sqrt{f+g x} \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^2 g^3}-\frac{(e f-d g) \tanh ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e} \sqrt{f+g x}}\right ) \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^{5/2} g^{7/2}}-\frac{(d+e x)^{3/2} \sqrt{f+g x} (-6 b e g+7 c d g+5 c e f)}{12 e^2 g^2}+\frac{c (d+e x)^{5/2} \sqrt{f+g x}}{3 e^2 g} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.255505, antiderivative size = 246, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {951, 80, 50, 63, 217, 206} \[ \frac{\sqrt{d+e x} \sqrt{f+g x} \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^2 g^3}-\frac{(e f-d g) \tanh ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e} \sqrt{f+g x}}\right ) \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^{5/2} g^{7/2}}-\frac{(d+e x)^{3/2} \sqrt{f+g x} (-6 b e g+7 c d g+5 c e f)}{12 e^2 g^2}+\frac{c (d+e x)^{5/2} \sqrt{f+g x}}{3 e^2 g} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 951
Rule 80
Rule 50
Rule 63
Rule 217
Rule 206
Rubi steps
\begin{align*} \int \frac{\sqrt{d+e x} \left (a+b x+c x^2\right )}{\sqrt{f+g x}} \, dx &=\frac{c (d+e x)^{5/2} \sqrt{f+g x}}{3 e^2 g}+\frac{\int \frac{\sqrt{d+e x} \left (\frac{1}{2} \left (6 a e^2 g-c d (5 e f+d g)\right )-\frac{1}{2} e (5 c e f+7 c d g-6 b e g) x\right )}{\sqrt{f+g x}} \, dx}{3 e^2 g}\\ &=-\frac{(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt{f+g x}}{12 e^2 g^2}+\frac{c (d+e x)^{5/2} \sqrt{f+g x}}{3 e^2 g}+\frac{\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \int \frac{\sqrt{d+e x}}{\sqrt{f+g x}} \, dx}{8 e^2 g^2}\\ &=\frac{\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt{d+e x} \sqrt{f+g x}}{8 e^2 g^3}-\frac{(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt{f+g x}}{12 e^2 g^2}+\frac{c (d+e x)^{5/2} \sqrt{f+g x}}{3 e^2 g}-\frac{\left ((e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right )\right ) \int \frac{1}{\sqrt{d+e x} \sqrt{f+g x}} \, dx}{16 e^2 g^3}\\ &=\frac{\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt{d+e x} \sqrt{f+g x}}{8 e^2 g^3}-\frac{(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt{f+g x}}{12 e^2 g^2}+\frac{c (d+e x)^{5/2} \sqrt{f+g x}}{3 e^2 g}-\frac{\left ((e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right )\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{f-\frac{d g}{e}+\frac{g x^2}{e}}} \, dx,x,\sqrt{d+e x}\right )}{8 e^3 g^3}\\ &=\frac{\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt{d+e x} \sqrt{f+g x}}{8 e^2 g^3}-\frac{(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt{f+g x}}{12 e^2 g^2}+\frac{c (d+e x)^{5/2} \sqrt{f+g x}}{3 e^2 g}-\frac{\left ((e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1-\frac{g x^2}{e}} \, dx,x,\frac{\sqrt{d+e x}}{\sqrt{f+g x}}\right )}{8 e^3 g^3}\\ &=\frac{\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt{d+e x} \sqrt{f+g x}}{8 e^2 g^3}-\frac{(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt{f+g x}}{12 e^2 g^2}+\frac{c (d+e x)^{5/2} \sqrt{f+g x}}{3 e^2 g}-\frac{(e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \tanh ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e} \sqrt{f+g x}}\right )}{8 e^{5/2} g^{7/2}}\\ \end{align*}
Mathematica [A] time = 1.08633, size = 225, normalized size = 0.91 \[ \frac{-e \sqrt{g} \sqrt{d+e x} (f+g x) \left (c \left (3 d^2 g^2-2 d e g (g x-2 f)+e^2 \left (-15 f^2+10 f g x-8 g^2 x^2\right )\right )-6 e g (4 a e g+b (d g-3 e f+2 e g x))\right )-3 (e f-d g)^{3/2} \sqrt{\frac{e (f+g x)}{e f-d g}} \sinh ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e f-d g}}\right ) \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{24 e^3 g^{7/2} \sqrt{f+g x}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.301, size = 763, normalized size = 3.1 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.12624, size = 1277, normalized size = 5.19 \begin{align*} \left [-\frac{3 \,{\left (5 \, c e^{3} f^{3} - 3 \,{\left (c d e^{2} + 2 \, b e^{3}\right )} f^{2} g -{\left (c d^{2} e - 4 \, b d e^{2} - 8 \, a e^{3}\right )} f g^{2} -{\left (c d^{3} - 2 \, b d^{2} e + 8 \, a d e^{2}\right )} g^{3}\right )} \sqrt{e g} \log \left (8 \, e^{2} g^{2} x^{2} + e^{2} f^{2} + 6 \, d e f g + d^{2} g^{2} + 4 \,{\left (2 \, e g x + e f + d g\right )} \sqrt{e g} \sqrt{e x + d} \sqrt{g x + f} + 8 \,{\left (e^{2} f g + d e g^{2}\right )} x\right ) - 4 \,{\left (8 \, c e^{3} g^{3} x^{2} + 15 \, c e^{3} f^{2} g - 2 \,{\left (2 \, c d e^{2} + 9 \, b e^{3}\right )} f g^{2} - 3 \,{\left (c d^{2} e - 2 \, b d e^{2} - 8 \, a e^{3}\right )} g^{3} - 2 \,{\left (5 \, c e^{3} f g^{2} -{\left (c d e^{2} + 6 \, b e^{3}\right )} g^{3}\right )} x\right )} \sqrt{e x + d} \sqrt{g x + f}}{96 \, e^{3} g^{4}}, \frac{3 \,{\left (5 \, c e^{3} f^{3} - 3 \,{\left (c d e^{2} + 2 \, b e^{3}\right )} f^{2} g -{\left (c d^{2} e - 4 \, b d e^{2} - 8 \, a e^{3}\right )} f g^{2} -{\left (c d^{3} - 2 \, b d^{2} e + 8 \, a d e^{2}\right )} g^{3}\right )} \sqrt{-e g} \arctan \left (\frac{{\left (2 \, e g x + e f + d g\right )} \sqrt{-e g} \sqrt{e x + d} \sqrt{g x + f}}{2 \,{\left (e^{2} g^{2} x^{2} + d e f g +{\left (e^{2} f g + d e g^{2}\right )} x\right )}}\right ) + 2 \,{\left (8 \, c e^{3} g^{3} x^{2} + 15 \, c e^{3} f^{2} g - 2 \,{\left (2 \, c d e^{2} + 9 \, b e^{3}\right )} f g^{2} - 3 \,{\left (c d^{2} e - 2 \, b d e^{2} - 8 \, a e^{3}\right )} g^{3} - 2 \,{\left (5 \, c e^{3} f g^{2} -{\left (c d e^{2} + 6 \, b e^{3}\right )} g^{3}\right )} x\right )} \sqrt{e x + d} \sqrt{g x + f}}{48 \, e^{3} g^{4}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23661, size = 393, normalized size = 1.6 \begin{align*} \frac{1}{24} \, \sqrt{{\left (x e + d\right )} g e - d g e + f e^{2}}{\left (2 \,{\left (x e + d\right )}{\left (\frac{4 \,{\left (x e + d\right )} c e^{\left (-3\right )}}{g} - \frac{{\left (7 \, c d g^{4} e^{6} + 5 \, c f g^{3} e^{7} - 6 \, b g^{4} e^{7}\right )} e^{\left (-9\right )}}{g^{5}}\right )} + \frac{3 \,{\left (c d^{2} g^{4} e^{6} + 2 \, c d f g^{3} e^{7} - 2 \, b d g^{4} e^{7} + 5 \, c f^{2} g^{2} e^{8} - 6 \, b f g^{3} e^{8} + 8 \, a g^{4} e^{8}\right )} e^{\left (-9\right )}}{g^{5}}\right )} \sqrt{x e + d} - \frac{{\left (c d^{3} g^{3} + c d^{2} f g^{2} e - 2 \, b d^{2} g^{3} e + 3 \, c d f^{2} g e^{2} - 4 \, b d f g^{2} e^{2} + 8 \, a d g^{3} e^{2} - 5 \, c f^{3} e^{3} + 6 \, b f^{2} g e^{3} - 8 \, a f g^{2} e^{3}\right )} e^{\left (-\frac{5}{2}\right )} \log \left ({\left | -\sqrt{x e + d} \sqrt{g} e^{\frac{1}{2}} + \sqrt{{\left (x e + d\right )} g e - d g e + f e^{2}} \right |}\right )}{8 \, g^{\frac{7}{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]